home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / game / board / Exchess.lha / EXChess / search.h < prev    next >
C/C++ Source or Header  |  1998-08-20  |  4KB  |  92 lines

  1. // search.h header file for search.cpp
  2.  
  3. /* extensions */
  4. // These values can be modified by the search.par text file.
  5. // The code to read the search.par file is in score.cpp.
  6. int THRESHOLD =   12;
  7. int CHECK_EXT =   12;
  8. int PAWN_EXT =     9;
  9. int RE_CAPT_EXT = 12;
  10. int INIT_EXT =     3;
  11. int MATE_EXT =    12;
  12. int PV_EXT =       0;
  13.  
  14. // Null move reduction factor
  15. int R = 2;
  16.  
  17. // Razoring depth
  18. int RAZOR_DEPTH = 2;
  19.  
  20. position sp[MAXD];                  // array of search positions
  21.  
  22. move_list slist[MAXD+1];            // array of search lists
  23. move pc[MAXD+1][MAXD+1];            // triangular array for search
  24.                                     // principle continuation
  25.  
  26. int max_ply;                        // max ply of current search
  27. int start_time;                     // start time of current search
  28. int limit;                          // time limit of search
  29. int ponder = 0;                     // flag for pondering
  30. int last_ponder = 0;                // flag for did we ponder last move?
  31. int ponder_time = 0;                // record of time used on last pondering
  32. int wbest, wply;                    // whisper variables for search summary
  33. int nullm, recur;                   // flags to control null moves
  34. int learned;                        // has book learning already happened?
  35. int turn;                           // Current game turn
  36. int fail;                           // flag for fail-high or fail-low in search
  37. int root_alpha, root_beta;          // starting values for alpha and beta
  38. int extend;                         // counter that keeps track of extensions
  39. int null_hash;                      // flag from hash table for null move
  40. int dummy1, dummy2;                 // flags from hash table to limit alpha/beta
  41.  
  42. move hmove;                         // move from hash table
  43. move bookm;                         // move from opening book
  44. move nomove;                        // no-move move, for initialization
  45. move ponder_move;                   // move we are pondering
  46.  
  47. unsigned long history[64][64];      // table for history scores
  48.  
  49. // These are a collection of counters that keep track of search
  50. // statistics and timing checks.
  51. unsigned long node_count, eval_count, time_count, extensions;
  52. unsigned long phash_count, hash_count, hmove_count, q_count;
  53. unsigned long null_cutoff, internal_iter;
  54. // define how many nodes between time checks.
  55. unsigned long time_check_interval = 12500;
  56.  
  57. // hash codes for side to move, piece types, stage of game, castling status,
  58. //   and en passant rights
  59. extern h_code wtm, btm, hval[13][64], stage_code[4];
  60. extern h_code castle_code[16], ep_code[64];
  61.  
  62. extern h_code p_list[600];     // list of position hash codes in game so far
  63.  
  64. // counter to tell the hash table how old the entries are
  65. extern short h_id;
  66.  
  67. extern int stage;                  // stage of the game, defined in score.cpp
  68.  
  69. extern int xboard, post;           // xboard flag, posting flag
  70. extern int book, ALLEG, ics;       // flags from main.cpp to control the book
  71.                                    // and playing modes
  72. extern int learn_count, learn_bk;  // flag to control learning and keep track
  73.                                    // of how many book moves have been played
  74. extern int tsuite, analysis_mode;  // flags to determine whether we are in
  75.                                    // analysis mode or a test suite
  76. extern float timeleft;             // total time left in the game
  77.  
  78. #if DEBUG
  79.  ofstream outfile;
  80. #endif
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.